public class ArrayExample {
    public static void main(String[] args) {
        // 定义一个整型数组
        int[] numbers = new int[5];

        // 数组赋值
        numbers[0] = 10;
        numbers[1] = 20;
        numbers[2] = 30;
        numbers[3] = 40;
        numbers[4] = 50;

        // 打印数组元素个数
        System.out.println("数组元素个数：" + numbers.length);

        // 打印数组元素
        System.out.println("数组元素：");
        for (int i = 0; i < numbers.length; i++) {
            System.out.println(numbers[i]);
        }
    }
}